package com.xcity.pomelo.response;

import naga.x.net.impl.pomelo.PomeloMessage;
import naga.x.net.impl.pomelo.PomeloPacket;
import naga.x.net.impl.pomelo.protocol.Message;

@PomeloMessage(type = Message.Type.RESPONSE)
public class Response extends PomeloPacket {

	protected short code;
	
	public static final short CODE_OK = 200;
	public static final short CODE_ERROR = 500;
	
	public Response(int serial) {
		this(serial, CODE_OK);
	}
	
	public Response(int serial, short code) {
		super(serial);
		this.code = code;
	}

	public short getCode() {
		return code;
	}

	public void setCode(short code) {
		this.code = code;
	}
	
}
